home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / PowerPC / Dev / PPCRelease / include / powerup / ppclib / ppc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-07-02  |  2.1 KB  |  109 lines

  1. #ifndef POWERUP_PPCLIB_PPC_H
  2. #define POWERUP_PPCLIB_PPC_H
  3.  
  4. #include <utility/tagitem.h>
  5.  
  6. /* PPCGetInfo() Tags */
  7.  
  8. #define    PPCINFOTAG_Dummy        (TAG_USER + 0x1f000)
  9.  
  10. /* Version of the CPU
  11.  * (Get)
  12.  */
  13. #define    PPCINFOTAG_CPU            (PPCINFOTAG_Dummy + 0x1)
  14.  
  15. /* CPU Count
  16.  * (Get)
  17.  */
  18. #define    PPCINFOTAG_CPUCOUNT        (PPCINFOTAG_Dummy + 0x2)
  19.  
  20. /* Clock of the CPU
  21.  * (Get)
  22.  */
  23. #define    PPCINFOTAG_CPUCLOCK        (PPCINFOTAG_Dummy + 0x3)
  24.  
  25. /* Revision of the CPU
  26.  * (Get)
  27.  */
  28. #define    PPCINFOTAG_CPUREV        (PPCINFOTAG_Dummy + 0x4)
  29.  
  30. /* Default ExceptionHook
  31.  * If you want to install an ExceptionHook
  32.  * to catch all exceptions by a debugger for example
  33.  * (Get/Set)
  34.  */
  35. #define    PPCINFOTAG_EXCEPTIONHOOK    (PPCINFOTAG_Dummy + 0x5)
  36.  
  37. /* Add PPCCreateTask Hook (V45)
  38.  * If you want to be notified when a new PPC Task
  39.  * is created. Usable for a debugger or a Task Viewer.
  40.  *
  41.  * BOOL CallHookPkt(YourHookHook, TaskObject, TaskHookMsg);
  42.  *
  43.  * If you want to install a new TrapHandler you can do it
  44.  * now in your Hook function. Or tell the Task to stop at the
  45.  * first instruction.
  46.  * The PPC Task is initiated after all Hook functions complete.
  47.  * The result defines if potential hooks should not be called.
  48.  * If you return TRUE no other hooks are called.
  49.  * (Set)
  50.  */
  51. #define    PPCINFOTAG_TASKHOOK    (PPCINFOTAG_Dummy + 0x6)
  52.  
  53. /* Remove a TaskHook (V45)
  54.  * (Set)
  55.  */
  56. #define    PPCINFOTAG_REMTASKHOOK    (PPCINFOTAG_Dummy + 0x7)
  57.  
  58. /* PLL Devider of the CPU (V45)
  59.  * (Get)
  60.  */
  61. #define    PPCINFOTAG_CPUPLL    (PPCINFOTAG_Dummy + 0x8)
  62.  
  63.  
  64.  
  65.  
  66. struct TaskHookMsg_Create
  67. {
  68.     ULONG        MethodID;
  69.     ULONG        Version;
  70.     void        *ElfObject;
  71.     struct TagItem    *Tags;
  72. };
  73.  
  74. struct TaskHookMsg_Delete
  75. {
  76.     ULONG        MethodID;
  77.     ULONG        Version;
  78. };
  79.  
  80. struct TaskHookMsg_Get
  81. {
  82.     ULONG        MethodID;
  83.     ULONG        Version;
  84.     struct TagItem    *Tags;
  85. };
  86.  
  87. struct TaskHookMsg_Set
  88. {
  89.     ULONG        MethodID;
  90.     ULONG        Version;
  91.     struct TagItem    *Tags;
  92. };
  93.  
  94. #define    PPCTASKHOOKMETHOD_CREATE    0
  95. #define    PPCTASKHOOKMETHOD_DELETE    1
  96. #define    PPCTASKHOOKMETHOD_GET        2
  97. #define    PPCTASKHOOKMETHOD_SET        3
  98.  
  99.  
  100. /* Current known PowerPC CPU versions */
  101. #define    CPU_603        3
  102. #define    CPU_604        4
  103. #define    CPU_602        5
  104. #define    CPU_603e    6
  105. #define    CPU_603p    7
  106. #define    CPU_604e    9
  107.  
  108. #endif
  109.